#include "Thread.h"


int ThreadStarter(void* data)
{
	((Thread*)data)->Work();
	return 0;
}

void Thread::Start()
{
	m_t = SDL_CreateThread(ThreadStarter,this);
}

int Thread::WaitForFinish()
{
    int ret = 0;
    SDL_WaitThread(m_t, &ret);
    return ret;
}
void Thread::KillThread()
{
    SDL_KillThread(m_t);
}
